package com.example.zzl.view.activity.HomeFragment;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.zzl.R;
import com.example.zzl.databinding.ActivityInfoBinding;
import com.example.zzl.view.BaseView;
import com.example.zzl.viewmodel.HomeFragment.InfoPresenter;

public class InfoActivity extends AppCompatActivity implements InfoPresenter.InfoCallback {

    private ActivityInfoBinding db;
    private InfoPresenter presenter;
    private String parameter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        getSupportActionBar().hide();
        super.onCreate(savedInstanceState);
        initIntent();
        db = DataBindingUtil.setContentView(this, R.layout.activity_info);
        presenter = new InfoPresenter(this, this, db);
        BaseView.initPresenter(presenter, parameter);
    }

    private void initIntent() {
        Bundle extras = getIntent().getExtras();
        parameter = extras.getString("parameter");
    }

    @Override
    protected void onStop() {
        super.onStop();
    }
}
